import Vue from 'vue';
import App from './App.vue';

//引入mint-ui
import MintUI from 'mint-ui';
import 'mint-ui/lib/style.css';
Vue.use(MintUI);

//引入路由
import VueResource from 'vue-resource';
Vue.use(VueResource);

//引入数据请求
import VueRouter from 'vue-router';
Vue.use(VueRouter);

//引入图标库
import './assets/font_85342i0roq2jfw29/iconfont.css';

//引入自己的css
import './assets/basic.css';
import './assets/index.css';
import './assets/search.css';
import './assets/details.css';
import './assets/orderCommit.css';
import './assets/discover.css';
import './assets/order.css';
import './assets/login.css';
import './assets/user.css';
import './assets/collection.css';
import './assets/reset.css';
import './assets/cart.css';


//引入轮播模块代码
import { Swipe, SwipeItem } from 'mint-ui';


//引入组件
import Home from './component/Home.vue';
import Discover from './component/Discover.vue';
import Order from './component/Order.vue';
import Mine from './component/Mine.vue';
import Search from './component/Search.vue';
import Detail from './component/Detail.vue';
import OrderCommit from './component/OrderCommit.vue';
import Login from './component/Login.vue';
import Register1 from './component/Register1.vue';
import Register2 from './component/Register2.vue';
import Register3 from './component/Register3.vue';
import Islogin from './component/Islogin.vue';
import Nologin from './component/Nologin.vue';
import Collection from './component/Collection.vue';
import Cart from './component/Cart.vue';

//配置路由
const routes=[
  {path:'/home',name:"home",component:Home},
  {path:'/discover',name:"discover",component:Discover},
  {path:'/order',name:"order",component:Order},
  {path:'/mine',name:"mine",component:Mine},
  {path:"/search",name:"search",component:Search},
  {path:"/detail/:id",name:"detail",component:Detail},
  {path:"/ordercommit/:id",name:"ordercommit",component:OrderCommit},
  {path:"/login",name:"login",component:Login},
  {path:"/register1",name:"register1",component:Register1},
  {path:"/register2",name:"register2",component:Register2},
  {path:"/register3",name:"register3",component:Register3},
  {path:"/islogin",name:"islogin",component:Islogin},
  {path:"/nologin",name:"nologin",component:Nologin},
  {path:"/collection",name:"collection",component:Collection},
  {path:"/cart",name:"cart",component:Cart},
  {path:'*',redirect:"/home"}
]


//实例化VueRouter
const router=new VueRouter({
  routes
})


//挂载到Vue实例上
new Vue({
  el: '#app',
  router,
  render: h => h(App)
})
